# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>

pkgname=automake
pkgver=1.15.1
pkgrel=1
pkgdesc="A GNU tool for automatically creating Makefiles"
arch=('any')
license=('GPL')
url="http://www.gnu.org/software/automake"
groups=('base-devel')
depends=('perl' 'bash')
makedepends=('autoconf')
checkdepends=('dejagnu' 'gcc-fortran' 'java-environment' 'vala' 'emacs' 'cscope')  # 'python'
source=(ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz{,.sig}
        automake-1.15-dejagnu-testcase.patch)
md5sums=('24cd3501b6ad8cd4d7e2546f07e8b4d4'
         'SKIP'
         'ffa4dd8eb78cea82c3009d76087598b1')
validpgpkeys=('E1622F96D2BB4E58018EEF9860F906016E407573'   # Stefano Lattarini
              'F2A38D7EEB2B66405761070D0ADEE10094604D37')  # Mathieu Lirzin

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}

  # fix testsuite issue with resent dejagnu
  patch -p1 -i $srcdir/automake-1.15-dejagnu-testcase.patch
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure --build=$CHOST --prefix=/usr
  make
}

check() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make check
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
